<?php
namespace Api\Model;
use Think\Model;

class NewsContentModel extends Model {
	private $_db='';
	public function __construct(){
		$this->_db=M('news_content');
	}
	public function getContentById($id) {
		if(!is_numeric($id) || !$id){
			throw_exception("ID不合法");
		}
		$data = $this ->_db->where('news_id='.$id)->find();
		return $data;
	}
}